package com.one.efaimaly.user;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.one.common.config.RouterPath;
import com.one.common.utils.StringUtils;
import com.one.common.view.base.BaseActivity;
import com.one.common.view.widget.BigEditView;
import com.one.common.view.widget.MyTitleBar;
import com.one.efaimaly.R;
import com.one.common.common.user.preserter.FeedbackPresenter;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * author ：zhulunjun
 * email  ：zhulunjun@qq.com
 * date   ：2018/8/11 下午5:58
 * description ：意见反馈
 **/
@Route(path = RouterPath.FEEDBACK)
public class FeedBackActivity extends BaseActivity<FeedbackPresenter> {
    @BindView(R.id.be_feedback)
    BigEditView beFeedback;

    @Override
    protected void initPresenter() {
        mPresenter = new FeedbackPresenter(this, this);
    }

    @Override
    public int getLayoutResId() {
        return R.layout.activity_feedback;
    }

    @Override
    protected void initTitle() {
        super.initTitle();
        getMyTitleBar().setMode(MyTitleBar.Mode.BACK_TITLE)
                .setTitleText("意见反馈");
    }

    @OnClick(R.id.tv_btn_confirm)
    public void submit(){
        if(StringUtils.isNotBlank(beFeedback.getText())){
            mPresenter.feedback(beFeedback.getText());
        }
    }


}
